﻿Namespace B1Data
    Public Class B1DataColumn
        Inherits Data.DataColumn
        Implements B1Data.IB1DataColumn
        Private _CheckValue As B1Data.CellCheckValue
        Private _ValidValues As B1ValidValues = New B1ValidValues(Me)
        Private _CellLogic As B1Data.CellBusinessLogic
        Private _CodeRule As B1Data.CodeRule
        Private _Dependents As B1Data.Dependents

        ''' <summary>
        ''' 数据检查
        ''' （需要继承CellCheckValue）
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Property CellCheck As B1Data.CellCheckValue
            Set(ByVal value As B1Data.CellCheckValue)
                _CheckValue = value
            End Set
            Get
                Return _CheckValue
            End Get
        End Property

        ''' <summary>
        ''' 字段依赖关系
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Property Dependents As B1Data.Dependents
            Set(ByVal value As B1Data.Dependents)
                _Dependents = value
            End Set
            Get
                Return _Dependents
            End Get
        End Property

        ''' <summary>
        ''' 数据更新后逻辑处理
        ''' （需要继承CellBusinessLogic）
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Property CellLogic As B1Data.CellBusinessLogic
            Get
                Return _CellLogic
            End Get
            Set(ByVal value As B1Data.CellBusinessLogic)
                _CellLogic = value
            End Set
        End Property

        ''' <summary>
        ''' 编码规则
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Property CodeRule As B1Data.CodeRule
            Set(ByVal value As B1Data.CodeRule)
                _CodeRule = value
            End Set
            Get
                Return _CodeRule
            End Get
        End Property

        Public Overloads ReadOnly Property Table As B1Data.B1DataTable
            Get
                Return MyBase.Table
            End Get
        End Property

        Public ReadOnly Property ValidValues As B1ValidValues
            Get
                Return _ValidValues
            End Get
        End Property
    End Class
End Namespace

